<?php
/**
 * Short Description  
 *
 * Long Description 
 *
 * @category   
 * @package    
 * @subpackage 
 * @copyright 
 * @author     Sandeep Manne<sandeep.manne@costrategix.com>
 */

class Mail
{
	private $_username = "";
	private $_password = "";
	
	private $_smtpHost = "";
	private $_smtpPort = "";
	
	/**
     * Used to connect mail client
     * @return unknown_type
     */
    public function connect()
    {
        require_once 'Core/Mail/Imap/Client.php';
        $this->_client = new Core_Mail_Imap_Client();
        /*$auth = Zend_Auth::getInstance();
        $identity = $auth->getIdentity();
        $password = $identity->details['user_password'];
        $username = $identity->details['user_name'];
        $username = explode('@',$username);
        $username = $username[0];*/
        $this->_client->connect('imap.gmail.com', 993, 'SSL', 'upload@smanne.com', 'upload1234');
        //$this->_client->connect('localhost',143,'TLS',$username,$password);
        $this->_client->checkFolders();
        return $this;
    }
    
	public function getMails()
    {
    	$messages = $this->_client->getAllMessages();
        var_dump($messages);die;
    }
    
    
}